package cn.medemede;

//客户端
public class Client {
    public static void main(String[] args) {
        //初始化棋子
        Originator og=new Originator("甲","马",1,1);

        //正常游戏中
        System.out.println("--------游戏中：");
        og.ChangeXY(1,2);
        og.toView();
        og.ChangeXY(5,6);
        og.toView();
        og.ChangeXY(7,9);
        og.toView();
        og.ChangeXY(11,4);
        og.toView();
        og.ChangeXY(2,8);
        og.toView();
        og.ChangeXY(7,7);
        og.toView();

        //悔棋操作
        System.out.println("--------开始悔棋：");
        System.out.print("---悔棋一步：");
        og.undo(1);
        System.out.print("---悔棋两步：");
        og.undo(2);
        System.out.print("---悔棋三步：");
        og.undo(3);
        System.out.print("---悔棋四步：");
        og.undo(4);
        System.out.print("---悔棋五步：");
        og.undo(5);

        //错误的悔棋，返回最早的一步
        System.out.print("---悔棋六步：");
        og.undo(6);
    }
}
